package site.entity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import neoutil.CommonEntity;

public class Paper extends CommonEntity{
	private String title;
	private String description;
	private String filePath;
	private String authorName;
	private String source;
	private String type;
	private int cid;
	private Date publishDate;
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getFilePath() {
		return filePath;
	}
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	public String getAuthorName() {
		return authorName;
	}
	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public String getSource() {
		return source;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public int getCid() {
		return cid;
	}
	public void setCid(int cid) {
		this.cid = cid;
	}
	public Date getPublishDate() {
		return publishDate;
	}
	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}
	
	public void setPublishDate(String publishDate) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		
		try {
			Date d = sdf.parse(publishDate);
			this.publishDate = d;
		} catch (ParseException e) {
			e.printStackTrace();
		}
	}
}
